package com.umpay.feign.hystrix;


import com.umpay.dto.UMFResponse.Message;
import com.umpay.dto.memberMgr.req.MemberPayAgreementsReq;
import com.umpay.dto.memberMgr.req.MemberQueryReq;
import com.umpay.dto.memberMgr.reqdep.MerDepInfRegReq;
import com.umpay.dto.memberMgr.res.MemberPayAgreementsRes;
import com.umpay.dto.memberMgr.res.MemberQueryRes;
import com.umpay.dto.memberMgr.res.MerInfRes;
import com.umpay.feign.client.MemberDomainServerFeignClient;
import com.umpay.feign.factory.MemberDomainFeignClientWithFactory;
import feign.hystrix.FallbackFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

@Component
public class MemberDomainServerFeignClientHystrix implements FallbackFactory<MemberDomainServerFeignClient> {

    private static final Logger LOGGER = LoggerFactory.getLogger(MemberDomainServerFeignClientHystrix.class);

    @Override
    public MemberDomainServerFeignClient create(Throwable cause) {
        MemberDomainServerFeignClientHystrix.LOGGER.info("fallback; reason was: {}", cause.getMessage());
        return new MemberDomainFeignClientWithFactory() {

			@Override
			public Message<MerInfRes> getMerInfo(String merId, String rpid) {
				// TODO Auto-generated method stub
				return null;
			}

			@Override
			public Message<MemberQueryRes> getMemberInfo(MemberQueryReq memberQueryReq) {
				// TODO Auto-generated method stub
				return null;
			}

			@Override
			public Message<MemberPayAgreementsRes> getMemberPayAgreemeetsInf(
			        MemberPayAgreementsReq memberPayAgreementsReq) {
				// TODO Auto-generated method stub
				return null;
			}

			@Override
			public Message<MerDepInfRegReq> merDepInfReg(MerDepInfRegReq merDepInfRegReq) {
				// TODO Auto-generated method stub
				return null;
			}

			@Override
			public Message<MemberPayAgreementsRes> getMemberCardsInf(MemberPayAgreementsReq memberPayAgreementsReq) {
				// TODO Auto-generated method stub
				return null;
			}

        };
    }
}
